package com.gitee.pifeng.monitoring.ui.business.web.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.pifeng.monitoring.common.inf.ISuperBean;
import com.gitee.pifeng.monitoring.ui.business.web.entity.XjDataLink;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

import java.util.Date;

@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "数链列表数据")
public class XjDataLinkVo implements ISuperBean {

    @Schema(description = "链路名称")
    private String dataLinkName;

    @Schema(description = "链路备注")
    private String remark;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


    public XjDataLinkVo convertFor(XjDataLink xjDataLink) {
        if (null != xjDataLink) {
            BeanUtils.copyProperties(xjDataLink, this);
        }
        return this;
    }

}
